package com.lss.service;

import com.lss.bean.Student;
import com.lss.dao.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService {

    /**
     * 容器自动注入
     */
    @Autowired
    StudentMapper studentMapper;

    @Override
    public List<Student> selectAll() {
        return studentMapper.selectAll();
    }

    @Override
    public Student selectById(String id) {
        return studentMapper.selectById(id);
    }

    @Override
    public void addStudent(Student student) {
        studentMapper.addStudent(student);
    }

    @Override
    public void updateStudent(Student student) {
        studentMapper.updateStudent(student);
    }

    @Override
    public void deleteStudent(String id) {
        studentMapper.deleteStudent(id);
    }

    @Override
    public List<Student> limitFindStudent(int start, int rows) {
        return studentMapper.limitFindStudent(start, rows);
    }

    @Override
    public int selectCount() {
        return studentMapper.selectCount();
    }

    @Override
    public Student selectBeingStudent(String id) {
        return studentMapper.selectBeingStudent(id);
    }

    @Override
    public List<Student> findStudentNews(Map map) {
        return studentMapper.findStudentNews(map);
    }

    @Override
    public List<Student> findStudentNewsByLimit(Map map) {
        return studentMapper.findStudentNewsByLimit(map);
    }
}
